package Data;

import java.util.ArrayList;
import java.util.LinkedList;

public class SendingFileList {
	  private LinkedList<SendingFile> files;
	  
	  public SendingFileList(){}
	  
	  public void addSendingFile(ArrayList<SendingFile> newfiles){
		  for(SendingFile file:newfiles){
			  files.add(file);
		  }
	  }
	  
	  public void addSendingFile(SendingFile newFile){
		  files.add(newFile);
	  }
	  
	  public LinkedList<SendingFile> getFiles(){
		  return files;
	  }
	  
	  public void changeFileState(SendingFile file ,boolean state){
		  for(int loopi = 0;loopi<files.size(); loopi++)
		  {
			  if(file.getFileName() == files.get(loopi).getFileName() 
					  && file.getFileNo() == files.get(loopi).getFileNo())
			  {
				 file.setIsTransfered(state);
				 files.set(loopi, file);
			  }
		  }
	  }
	  
	  public boolean checkFile(SendingFile file){
		  
		  
		return false;
		  
	  }
}
